home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- /* #include <strings.h> */
- #include "Extern.h"
- PrintLine(OffSet,LineStart,LineEnd)
- int OffSet; /* offset of LineStart from beginning of file */
- char *LineStart,
- *LineEnd;
- {
- char OffStr[80];
- if (lFlag) {
- sprintf(OffStr,"%s\n",FileName);
- write(1,OffStr,strlen(OffStr));
- return;
- } /* if */
- if (FileName) {
- sprintf(OffStr,"%s: ",FileName);
- write(1,OffStr,strlen(OffStr));
- } /* if */
- if (nFlag) {
- sprintf(OffStr,"%d: ",OffSet);
- write(1,OffStr,strlen(OffStr));
- } /* if */
- write(1,LineStart,LineEnd-LineStart+1);
- if (*LineEnd != '\n') write (1,"\n",1);
- } /* PrintLine */